window.onload = function () {
    var searchBar = document.querySelector('.searchBar');
    var icon = document.querySelector('.icon');
    var text = document.querySelector('#text');
    var clear = document.querySelector('.clear');
    icon.addEventListener("click", function () {
        searchBar.style.width = '400px';
        icon.addEventListener("click", function () {
            searchBar.style.width = '60px';
        })
    });
    clear.addEventListener("click", function () {
        text.value = '';
    });

    var swiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        paginationClickable: '.swiper-pagination',
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
        scrollbar: {
            el: '.swiper-scrollbar',
        },
        spaceBetween: 30,
        effect: 'fade',
        loop: true,
        autoplay: {
            delay: 2000,
            stopOnLastSlide: false,
            disableOnInteraction: true,
        },

    })

};